# !/bin/bash
rm -rf ./driver data logs
if [ ! -d "./driver"]; then
    mkdir driver
fi
mkdir data logs

echo "Installing firefox"

# ubuntu
if [! -d "/usr/bin/firefox"];then
    sudo apt install firefox
fi

echo "Installing geckodriver"

pushd driver
curl -fSL https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz -o geckodriver.tar.gz
tar -zxvf geckodriver.tar.gz
popd

pip install -r requirments.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/
echo "Successfuly installed"
